package caronas.modelo;

import br.com.caelum.vraptor.ioc.Component;
import br.com.caelum.vraptor.ioc.SessionScoped;

@Component @SessionScoped
public class UsuarioWeb {
	Usuario logado;
	Service service;
	public void login(Usuario logado, Service service) {
		this.logado = logado;
		this.service = service;
	}
	
	public Usuario getUsuario() {
		return this.logado;
	}
	
	
	public Service getService() {
		return service;
	}

	public String getNome() {
		return logado.getNome();
	}
	
	public String getEmail() {
		return logado.getEmail();
	}
		
	public boolean isLogado() {
		return logado != null;
	}
	
	public void logout() {
		logado = null;
	}
}
